var minimumOperations = function (nums) {
  if (nums.length) {
    let num1 = Array.from(new Set(nums))
    num1.forEach((item, index) => {
      if (item === 0) {
        num1.splice(index, 1)
      }
    })
    return console.log(num1.length);
  }
  return 0
};

minimumOperations([1, 5, 0, 3, 5])